package a.f.h.a.b;

import a.c.ab;
import a.c.d;
import a.c.m;
import a.c.q;
import a.f.h.a.a.i;
import a.f.h.a.a.n;

public class g
{
  private b a;
  private q b;
  private a.f.h.a.a.b c;
  public static int d;
  
  public g(b paramb)
  {
    this.a = paramb;
    this.b = this.a.d();
    this.c = this.a.b();
  }
  
  public static void a(b paramb)
  {
    g localg = new g(paramb);
    localg.a();
  }
  
  public void a()
  {
    this.a.h();
    n.c(new b_(null), this.c);
  }
  
  public void a(a.c.e parame)
  {
    boolean bool = b.i;
    int i = b.h;
    ab localab1 = this.a.b(parame);
    ab localab2 = new ab();
    d locald1 = (d)localab1.a();
    d locald2 = this.a.l(locald1);
    localab2.a(locald1);
    do
    {
      if (locald1 == locald2) {
        break label133;
      }
      if (bool) {
        break label107;
      }
      if (locald2.f() != parame) {
        break;
      }
      if (bool) {
        break label98;
      }
      locald2 = this.a.c(locald2);
    } while (i == 0);
    label98:
    label107:
    do
    {
      if (!bool) {
        if (locald2.e() == parame) {
          localab2.a(locald2);
        }
      }
      locald2 = this.a.l(locald2);
      if (i == 0) {
        break;
      }
      this.a.c(parame, localab2);
    } while (bool);
    label133:
  }
  
  public void c(a.c.e parame)
  {
    boolean bool = b.i;
    int i = b.h;
    ab localab1 = this.a.b(parame);
    ab localab2 = this.a.a(parame);
    ab localab3 = new ab();
    m localm = localab1.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald1 = localm.a();
      d locald2 = this.a.i(locald1);
      if (i != 0) {
        return;
      }
      if (parame == locald2.f()) {
        locald2 = this.a.c(locald2);
      }
      localab3.a(locald2);
      localab2.remove(locald2);
      localm.f();
    } while (i == 0);
    localab3.addAll(localab2);
    if (!bool) {
      this.a.a(parame, localab3);
    }
  }
  
  private class b_
    implements i
  {
    private b_() {}
    
    public void a(a.f.h.a.a.e parame)
    {
      a.f.h.a.a.g localg = (a.f.h.a.a.g)parame;
      a.c.e locale = localg.e();
      if (localg.d()) {
        return;
      }
      ab localab = g.this.a.b(locale);
      if (!b.i)
      {
        if ((localg.f()) || (localab.size() == 0)) {
          g.this.a.m(locale);
        }
      }
      else {
        return;
      }
      g.this.a(locale);
      g.this.c(locale);
      g.this.a.m(locale);
    }
    
    b_(g.0 param0)
    {
      this();
    }
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.h.a.b.g
 * JD-Core Version:    0.7.0.1
 */